import { defAxios as request } from '@/utils/http'

/**
 * 问题 分页查询
 * @returns
 */
export const getQuestionList = params => request({
  url: '/inspectionFile/page/list',
  method: 'GET',
  params
})

/**
 * 问题 详情(处理结果)
 * @param {String} params id
 * @returns
 */
export const getQueationDetail = params => request({
  url: `/inspectionFile/handle/${params}`,
  method: 'GET'
})

/**
 * 问题 生成工单
 * @param {String} params idList
 * @returns
 */
export const workOrder = params => request({
  url: `/workorder/generate/${params}`,
  method: 'POST'
})

/**
 * 问题 分布
 * @returns
 */
export const getQuestionDistribution = params => request({
  url: '/inspectionFile/list/distribution',
  method: 'GET',
  params
})
/**
 * 问题 修改问题类型
 * @returns
 */
export const ChangeQuestionType = data => request({
  url: '/inspectionFile/edit/question/' + data,
  method: 'PUT'

})

